//
//  PopupTranslucentView.m
//  NewiOSProject
//
//  Created by li on 2023/9/6.
//  Copyright © 2023 范智渊. All rights reserved.
//

#import "PopupTranslucentView.h"

@implementation PopupTranslucentView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.6];
        [self addTarget:self action:@selector(clickAction:) forControlEvents:(UIControlEventTouchUpInside)];
        
    }
    return self;
}

- (void)clickAction: (UIButton *)sender {
    
    if (self.clickAction) {
        self.clickAction();
    }
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
